resolves #41 set up permissions to allow workflow to publish to GitHu… #20
This file contains 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: Publish to GitHub Pages | |
on: | |
push: | |
branches: [main, master] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
jekyll: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Use the GitHub Actions cache to shorten build times and decrease load on servers | |
- uses: actions/cache@v2 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }} | |
restore-keys: ${{ runner.os }}-gems- | |
# Standard usage | |
- uses: helaili/jekyll-action@v2 | |
with: | |
pre_build_commands: | | |
sed -i "s/^#baseurl: .*/baseurl: \/${{ github.event.repository.name }}/" _config.yml | |
gem update --system | |
token: ${{ secrets.GITHUB_TOKEN }} |