繼續實施新的後端 #66
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
name: Deploy to Github Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/deploy-to-ghpages.yml' | |
- 'package-lock.json' | |
- 'package.json' | |
- 'src/core/**' | |
- 'src/pages/**' | |
- 'src/react-ui/**' | |
- 'src/web-app/**' | |
- 'tsconfig.json' | |
jobs: | |
build-and-deploy: | |
if: github.repository == 'igncp/writing-trainer' || github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install 🚧 | |
run: | | |
touch ./is-ci-nodejs | |
nix develop path:$(pwd) -c npm install | |
- name: Build 🔧 | |
run: | | |
nix develop path:$(pwd) -c bash scripts/ci/gh_pages_action.sh | |
env: | |
NEXT_PUBLIC_BACKEND_URL: 'https://api.learn-languages-writing.com' | |
NEXT_PUBLIC_GOOGLE_CLIENT_ID: '128663644139-o8phiqm9vbn3onkrj0ehircqi59sm319.apps.googleusercontent.com' | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: gh_pages # The folder the action should deploy. |