Skip to content

Build and deploy mirror #11

Build and deploy mirror

Build and deploy mirror #11

name: Build and deploy mirror
on:
schedule:
# Nightly at 03:00 UTC.
- cron: "0 3 * * *"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout backup data
uses: actions/checkout@v6
with:
ref: master
path: backup
- name: Checkout mirror tool
uses: actions/checkout@v6
with:
repository: 0xB10C/github-metadata-mirror
ref: master
path: tool
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: pip install mistune
- name: Build mirror
working-directory: tool
run: |
python build.py \
--input ../backup \
--output ../public \
--title "Bitcoin Core GUI GitHub Mirror" \
--owner bitcoin-core \
--repository gui \
--base-url "/github-metadata-backup-bitcoin-core-gui/" \
--markdown
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: public
deploy:
needs: build
runs-on: ubuntu-slim
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4