Add minify_html plugin (#83) #37
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: Deploy | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'src/**' | |
- '_config.ts' | |
- 'deno.jsonc' | |
- 'deno.lock' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v2.x | |
- uses: actions/cache/restore@v4 | |
id: cache | |
with: | |
path: | | |
~/.cache/deno | |
_cache | |
key: Default Cache | |
- name: Build | |
run: | | |
deno task lume | |
touch public/.nojekyll | |
- name: Upload | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: public/ | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
- name: Delete previous cache | |
if: ${{ steps.cache.outputs.cache-hit }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh extension install actions/gh-actions-cache | |
gh actions-cache delete "Default Cache" --confirm | |
- uses: actions/cache/save@v4 | |
with: | |
path: | | |
~/.cache/deno | |
_cache | |
key: Default Cache |