Skip to content

Commit 36f77e4

Browse files
committed
Refactor GH Actions build and deploy
* Use ruby minor dependency to use automatically latest patch version * Add GH Actions caching * Remove not needed `apt install` * Do not deploy on forks
1 parent 2564bf9 commit 36f77e4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
runs-on: ubuntu-22.04
1313
steps:
1414
- uses: actions/checkout@v4
15-
- run: sudo apt-get install ruby-full build-essential zlib1g-dev git
1615
- uses: ruby/setup-ruby@v1
1716
with:
18-
ruby-version: '3.2.0'
19-
- run: gem install bundler jekyll --no-document
20-
- run: bundle install
17+
ruby-version: '3.2'
18+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
2119
- run: bundle exec jekyll build
2220
- run: touch _site/.nojekyll
23-
- uses: JamesIves/github-pages-deploy-action@v4
21+
- name: Deploy to gh-pages branch
22+
uses: JamesIves/github-pages-deploy-action@v4
23+
if: github.repository_owner == 'antennapod' # do not run on forks
2424
with:
2525
token: ${{ secrets.GITHUB_TOKEN }}
2626
branch: gh-pages

0 commit comments

Comments
 (0)