data/.github/workflows/deploy.yml

66 lines
1.5 KiB
YAML
Raw Normal View History

2024-03-04 15:38:34 +01:00
name: Deploy to GitHub Pages
2023-11-28 03:05:02 +01:00
on:
2024-03-04 15:38:34 +01:00
push:
branches: [ main ]
workflow_dispatch:
workflow_run:
2024-09-05 20:04:19 +02:00
workflows: ["Synchronize data"]
2024-03-04 15:38:34 +01:00
types:
- completed
2024-09-05 19:56:55 +02:00
2023-11-28 03:05:02 +01:00
permissions:
2024-09-05 23:04:15 +02:00
actions: write
contents: write
2024-03-04 15:38:34 +01:00
pages: write
id-token: write
2023-11-28 03:05:02 +01:00
jobs:
2024-03-04 15:38:34 +01:00
build:
2023-11-28 03:05:02 +01:00
runs-on: ubuntu-latest
steps:
2024-03-04 15:38:34 +01:00
- name: Checkout your repository using git
uses: actions/checkout@v4
2023-11-28 03:05:02 +01:00
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: szenius/set-timezone@v2.0
2023-11-28 03:05:02 +01:00
with:
timezoneLinux: "Europe/Prague"
- name: Cache
run: make cache
- name: Test
run: make test
- name: Build bundle
run: make build
2024-01-25 21:42:36 +01:00
- name: Add custom domain
run: "touch dist/CNAME && echo \"data.web3privacy.info\" >> dist/CNAME"
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3.0.1
2024-09-06 20:06:34 +02:00
path: ./dist/
2024-03-04 15:38:34 +01:00
deploy:
needs: build
permissions:
2024-09-05 23:04:15 +02:00
actions: write
contents: read
pages: write
id-token: write
2024-03-04 15:38:34 +01:00
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
2024-09-05 19:00:15 +02:00
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
2024-03-04 15:38:34 +01:00
- name: Deploy to GitHub Pages
id: deployment
2024-09-05 23:04:15 +02:00
uses: actions/deploy-pages@v4