add copyright and license information #9
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
| # .github/workflows/deploy-main.yaml | |
| name: Build and Deploy Main Branch | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/reusable-build.yaml | |
| # This job gets the environment URL and triggers the build | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| # This new job updates the search index after the build is complete | |
| update-search-index: | |
| runs-on: ubuntu-latest | |
| needs: [build, deploy] | |
| continue-on-error: true # Makes this job optional, as you had before | |
| defaults: | |
| run: | |
| working-directory: ./docs | |
| env: | |
| SECRET_ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Ruby, Bundler, and Install Gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| working-directory: ./docs | |
| bundler-cache: true | |
| - name: Update Algolia Index | |
| run: | | |
| ALGOLIA_API_KEY="$SECRET_ALGOLIA_API_KEY" bundle exec jekyll algolia |