Update 0x3E #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 12 | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
# Set up a cache for the node modules to speed up builds | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
# Runs a single command using the runners shell | |
- name: Install Build Tools | |
run: npm install | |
# Runs a set of commands using the runners shell | |
- name: Build App | |
run: npm run build | |
# Deploy the new built app but only for push. PR should not be able to deploy ... | |
- name: Deploy 🚀 | |
if: ${{ github.event_name == 'push' }} | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: docs # The branch the action should deploy to. | |
FOLDER: docs # The folder the action should deploy. | |
CLEAN: true # Automatically remove deleted files from the deploy branch |