@@ -11,23 +11,49 @@ jobs:
1111 build_jekyll :
1212 runs-on : ubuntu-latest
1313 if : github.repository_owner == 'music-encoding'
14-
15- permissions :
16- contents : write
1714
1815 steps :
1916 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2017
21- # Use GitHub Actions' cache to shorten build times and decrease load on servers
22- - uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2 .0
18+ - name : Setup Ruby
19+ uses : ruby/setup-ruby@2654679fe7f7c29875c669398a8ec0791b8a64a1 # v1.215 .0
2320 with :
24- path : vendor/bundle
25- key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
26- restore-keys : |
27- ${{ runner.os }}-gems-
21+ ruby-version : ' 3.1' # Not needed with a .ruby-version file
22+ bundler-cache : true # runs 'bundle install' and caches installed gems automatically
23+ cache-version : 0 # Increment this number if you need to re-download cached gems
24+
25+ - name : Setup Pages
26+ id : pages
27+ uses : actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
2828
29- # Build Jekyll to the specified target branch
30- - uses : helaili/jekyll-action@c1527523361ec3ecc54b2371ddef44826e28c0f5 # v2.5.0
31- with :
32- token : ${{ secrets.GITHUB_TOKEN }}
33- target_branch : ' gh-pages'
29+ - name : Build with Jekyll
30+ # Outputs to the './_site' directory by default
31+ run : bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
32+ env :
33+ JEKYLL_ENV : production
34+
35+ - name : Upload artifact
36+ # Automatically uploads an artifact from the './_site' directory by default
37+ uses : actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
38+
39+
40+ deploy :
41+ runs-on : ubuntu-latest
42+ if : github.repository_owner == 'music-encoding'
43+
44+ needs : build_jekyll
45+
46+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
47+ permissions :
48+ pages : write # to deploy to Pages
49+ id-token : write # to verify the deployment originates from an appropriate source
50+
51+ # Setup the github-pages environment
52+ environment :
53+ name : github-pages
54+ url : ${{ steps.deployment.outputs.page_url }}
55+
56+ steps :
57+ - name : Deploy to GitHub Pages
58+ id : deployment
59+ uses : actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
0 commit comments