fix: deploy #16
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 Jekyll site to Pages | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1.225.0 | |
| with: | |
| ruby-version: '3.1' | |
| bundler-cache: true | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Build Site | |
| uses: actions/jekyll-build-pages@v1.0.13 | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: "_site" | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4.0.5 | |
| with: | |
| site: "_site" | |
| target_branch: main | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| keep_files: false | |
| publish_dir: "_site" | |
| cname: "NotAwar.github.io" | |
| commit_message: "Deploy site to GitHub Pages" | |
| force_orphan: true | |
| clean: true | |
| allow_empty_commit: false | |
| user: "NotAwar" | |
| # Adding a new parameter for semantic versioning | |
| version: "1.0.0" | |
| # Ensure that the deployment is tagged with the version | |
| tag: "v1.0.0" |