fix configuring github pages #20
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy-react-three-org-website: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Build pruned github app | |
| run: | | |
| pnpm -F react-three-org-website... install | |
| pnpm -F react-three-org-website... build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: apps/react-three-org/dist | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| deploy-github-app: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Build pruned github app | |
| run: | | |
| pnpm -F github-app... install | |
| pnpm -F github-app... build | |
| echo "inject-workspace-packages=true" >> ./.npmrc | |
| pnpm -F github-app... install --no-frozen-lockfile | |
| pnpm -F github-app deploy --prod ./apps/github/pruned | |
| - uses: superfly/flyctl-actions/setup-flyctl@master | |
| - name: Deploy github app | |
| working-directory: ./apps/github | |
| run: flyctl deploy --remote-only | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |