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
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branchs name
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
workflow_run:
workflows: ["Synchronize data"]
types:
- completed
2024-09-05 19:50:41 +02:00
workflows: ["Upload GitHub Pages artifact"]
types:
- completed
2024-03-04 15:38:34 +01:00
# Allow this job to clone the repo and create a page deployment
2023-11-28 03:05:02 +01:00
permissions:
actions: read
2024-03-04 15:38:34 +01:00
contents: read
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"
2024-03-04 15:38:34 +01:00
deploy:
needs: build
permissions:
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:
2024-03-04 15:38:34 +01:00
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action