add deadline #2
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
on: | |
workflow_dispatch: | |
push: | |
branches: main | |
name: Quarto Publish | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Render and Publish | |
uses: quarto-dev/quarto-actions/publish@v2 | |
with: | |
target: gh-pages | |
render: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout gh-pages | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- name: Install staticrypt | |
run: sudo npm install -g staticrypt | |
- name: Encrypt index | |
run: find . -type f -name "*.html" -exec staticrypt {} -p ${{ secrets.WEBSITE_TOKEN }} --short -o {} -d "./" --template-color-primary "#006a81" --template-color-secondary "#00C1D4" \; | |
- name: Commit files | |
run: | | |
git config --global user.name "jwarz" | |
git config --global user.email "joschka.schwarz@tuhh.de" | |
git add . | |
git commit -m "encrypted files" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
steps: | |
- name: Checkout gh-pages | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
# Upload entire repository | |
path: '.' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |