|
| 1 | +name: Deploy to GitHub Pages |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + release: |
| 6 | + types: [released] |
| 7 | + # Review gh actions docs if you want to further define triggers, paths, etc |
| 8 | + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on |
| 9 | + |
| 10 | +jobs: |
| 11 | + deploy: |
| 12 | + name: Deploy to GitHub Pages |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + - uses: actions/setup-node@v4 |
| 17 | + with: |
| 18 | + node-version: 20 |
| 19 | + cache: npm |
| 20 | + |
| 21 | + - name: Install app dev dependencies |
| 22 | + run: npm ci |
| 23 | + |
| 24 | + - name: Install docusaurus dependencies |
| 25 | + run: npm ci |
| 26 | + working-directory: ./docsite |
| 27 | + - name: Build website |
| 28 | + env: |
| 29 | + RY_ANALYTICS: ${{ vars.RY_ANALYTICS }} |
| 30 | + RY_ANALYTICS_SITEID: ${{ vars.RY_ANALYTICS_SITEID }} |
| 31 | + RY_ANALYTICS_REPLAY: ${{ vars.RY_ANALYTICS_REPLAY }} |
| 32 | + GSITEVERIFICATION: ${{ vars.GSITEVERIFICATION }} |
| 33 | + DOCS_BASE: '/komodo-import' |
| 34 | + run: npm run build |
| 35 | + working-directory: ./docsite |
| 36 | + |
| 37 | + # Popular action to deploy to GitHub Pages: |
| 38 | + # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus |
| 39 | + - name: Deploy to GitHub Pages |
| 40 | + uses: peaceiris/actions-gh-pages@v3 |
| 41 | + with: |
| 42 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 43 | + # Build output to publish to the `gh-pages` branch: |
| 44 | + publish_dir: ./docsite/build |
| 45 | + # The following lines assign commit authorship to the official |
| 46 | + # GH-Actions bot for deploys to `gh-pages` branch: |
| 47 | + # https://github.com/actions/checkout/issues/13#issuecomment-724415212 |
| 48 | + # The GH actions bot is used by default if you didn't specify the two fields. |
| 49 | + # You can swap them out with your own user credentials. |
| 50 | + user_name: github-actions[bot] |
| 51 | + user_email: 41898282+github-actions[bot]@users.noreply.github.com |
0 commit comments