fix env variables #27
This file contains hidden or 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 Frontend to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'packages/client/**' | |
| - '.github/workflows/deploy-frontend.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Install Dependencies | |
| working-directory: packages/client | |
| run: yarn install --frozen-lockfile | |
| - name: Build Frontend | |
| working-directory: packages/client | |
| run: yarn build | |
| # Important for SPA routing on GitHub Pages: | |
| - name: Setup SPA routing (404.html) | |
| run: cp packages/client/dist/index.html packages/client/dist/404.html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: packages/client/dist | |
| cname: arstoien.org |