File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release static site on tag
2+
3+ on :
4+ push :
5+ tags :
6+ - " *"
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ build-and-release :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Ruby
19+ uses : ruby/setup-ruby@v1
20+ with :
21+ ruby-version : ' 3.1'
22+ bundler-cache : true
23+
24+ - name : Build with Jekyll
25+ env :
26+ JEKYLL_ENV : production
27+ run : |
28+ bundle exec jekyll build
29+
30+ - name : Archive site
31+ run : |
32+ cd _site
33+ zip -r ../site-static-${{ github.ref_name }}.zip .
34+
35+ - name : Create GitHub Release
36+ id : create_release
37+ uses : softprops/action-gh-release@v2
38+ with :
39+ tag_name : ${{ github.ref_name }}
40+ name : Release ${{ github.ref_name }}
41+ body : |
42+ Automated release for tag ${{ github.ref_name }}.
43+ Contains the static site generated by Jekyll from this commit.
44+ draft : false
45+ prerelease : false
46+ files : |
47+ site-static-${{ github.ref_name }}.zip
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments