Merge pull request #83 from linkwarden/dev #51
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack + activate Yarn from packageManager | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.12.0 --activate | |
| yarn --version | |
| - name: Cache Yarn v4 | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .yarn/cache | |
| .yarn/unplugged | |
| .yarn/install-state.gz | |
| .pnp.cjs | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Generate OpenAPI docs | |
| run: yarn docusaurus gen-api-docs all | |
| - name: Build website | |
| run: yarn build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build | |
| user_name: daniel31x13 | |
| user_email: daniel31x13@gmail.com |