update dependencies and move overrides under pnpm to clear security a… #135
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", "develop"] | |
| workflow_dispatch: | |
| jobs: | |
| # BUILD | |
| build: | |
| name: Build site | |
| uses: ./.github/workflows/build.yml | |
| with: | |
| site-url: ${{ github.ref == 'refs/heads/main' && 'https://docs.cryptomator.org' || 'https://docs.staging.cryptomator.org' }} | |
| # DEPLOY PROD | |
| deploy-prod: | |
| if: github.ref == 'refs/heads/main' | |
| name: Deploy Prod to GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Download build | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| artifact-ids: ${{ needs.build.outputs.artifact-id }} | |
| path: ./build | |
| merge-multiple: true | |
| - name: Upload Prod Pages artifact | |
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| with: | |
| name: prod-site | |
| path: './build' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 | |
| with: | |
| artifact_name: prod-site | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| # DEPLOY STAGING | |
| deploy-staging: | |
| if: github.ref == 'refs/heads/develop' | |
| name: Deploy Staging to GitHub Pages | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - name: Download build | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| artifact-ids: ${{ needs.build.outputs.artifact-id }} | |
| path: ./public | |
| merge-multiple: true | |
| - name: Add robots.txt for staging | |
| run: 'echo -e "User-agent: *\nDisallow: /" > public/robots.txt' | |
| - name: Deploy to Staging Repository | |
| uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 | |
| with: | |
| personal_token: ${{ secrets.CRYPTOBOT_DEPLOY_STAGING_DOCS }} | |
| external_repository: cryptomator/docs-staging | |
| publish_dir: ./public | |
| publish_branch: main | |
| cname: docs.staging.cryptomator.org |