using legacy mirror-web image to build #311
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: Jekyll Build & Deploy | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build_and_upload: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build the site in the tunathu/mirror-web container | |
run: | | |
echo "Working on ref ${{github.ref}}" | |
docker run --user "$(id -u):$(id -g)" --env JEKYLL_ENV="production" -v ${{ github.workspace }}:/data tunathu/mirror-web:legacy jekyll build --future | |
- name: Upload artifacts | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: '_site/' | |
name: 'gh-pages-${{github.sha}}' | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build_and_upload | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
if: ${{ github.ref == 'refs/heads/master' }} | |
steps: | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v1 | |
with: | |
artifact_name: 'gh-pages-${{github.sha}}' |