apply the same change to old editions #207
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: rebuild and deploy | |
on: [push, pull_request] | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2.3.4 | |
with: | |
persist-credentials: false | |
- uses: cachix/install-nix-action@master | |
- uses: cachix/cachix-action@master | |
with: | |
name: zoranbosnjak | |
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
- name: rebuild | |
run: | | |
revDate=$(git show -s --format=%as ${{ github.sha }}) | |
nix-build --argstr gitrev ${{ github.sha }} --argstr gitdate $revDate | |
rsync -r -L --delete result/ output/ | |
find output -type d | xargs chmod 755 | |
find output -type f | xargs chmod 644 | |
touch output/.nojekyll | |
- name: show event | |
run: echo ${{ github.event_name }} | |
- name: show ref | |
run: echo ${{ github.ref }} | |
- name: deploy | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
uses: JamesIves/github-pages-deploy-action@3.7.1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: output | |
CLEAN: true | |
SINGLE_COMMIT: true | |