Skip to content
Permalink
Browse files
Refactor GH Actions job that uses third party action (#3)
* remove third-party GH actions

* re-enable some stages
  • Loading branch information
thisisnic committed Aug 5, 2021
1 parent 21a8695 commit 53ac09a23acd6f06137df3c007d29aca0be4894e
Showing 1 changed file with 26 additions and 25 deletions.
@@ -11,38 +11,39 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@v1
- name: Setup R
uses: r-lib/actions/setup-r@v1
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v1
- name: Install dependencies
run: sudo apt install libcurl4-openssl-dev libssl-dev
run: sudo apt install libcurl4-openssl-dev libssl-dev python3-pip
- name: Run tests
run: make test
- name: Build and render books
run: make all
- uses: actions/upload-artifact@v1
- name: Upload book artifact
uses: actions/upload-artifact@v1
with:
name: build_book
path: build/

checkout-and-deploy:
runs-on: ubuntu-latest
needs: make_books
steps:
- name: Checkout
uses: actions/checkout@master
- name: Download artifact
uses: actions/download-artifact@v1.0.0
with:
# Artifact name
name: build_book # optional
# Destination path
path: . # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
email: ${{ secrets.EMAIL }}
build_dir: . # optional
jekyll: no # optional

runs-on: ubuntu-latest
needs: make_books
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
- name: Download book artifact
uses: actions/download-artifact@v1.0.0
with:
name: build_book
path: .
- name: Push changes to gh-pages branch
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add *
git commit -m 'publish built book'
git push origin gh-pages

0 comments on commit 53ac09a

Please sign in to comment.