Skip to content

Instantly share code, notes, and snippets.

@shiburagi
Created November 29, 2023 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiburagi/5ca27c6b6c1c623a0db0a66091343a61 to your computer and use it in GitHub Desktop.
Save shiburagi/5ca27c6b6c1c623a0db0a66091343a61 to your computer and use it in GitHub Desktop.
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Deploy
permissions:
contents: write
env:
CI: false
on:
workflow_dispatch: {}
push:
branches: [ "develop" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: yarn install
- run: yarn localize
- run: |
cd public
touch CNAME
> CNAME
echo "${{ secrets.CNAME }}" >> CNAME
- name: remove local config
continue-on-error: true
run: |
cd public
cd config
rm localhost:3000.json
rm localhost:3001.json
- run: yarn build
- run: cp build/index.html build/404.html
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build # The folder the action should deploy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment