Add environment name to workflow #2
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: [gh-pages] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Fetch README from main | |
| run: | | |
| git fetch origin main | |
| git show origin/main:README.md > README.md | |
| - name: Prepare content | |
| run: | | |
| printf '+++\ntitle = ""\n+++\n\n' > content/_index.md | |
| cat README.md >> content/_index.md | |
| sed -i 's|](screenshot.png)|](/screenshot.png)|g' content/_index.md | |
| - name: Install Zola | |
| run: | | |
| curl -LsSf https://github.com/getzola/zola/releases/download/v0.22.1/zola-v0.22.1-x86_64-unknown-linux-gnu.tar.gz | tar zx | |
| sudo install -m 755 zola /usr/local/bin/ | |
| - name: Build | |
| run: zola build | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: public | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |