35 lines
994 B
YAML
35 lines
994 B
YAML
name: Publish to Cloudflare Pages
|
|
|
|
env:
|
|
ZOLA_VERSION: 0.17.2
|
|
|
|
on:
|
|
workflow_dispatch: # keep manual Github Action trigger in case of any issues with CF pages
|
|
# push:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
environment: production
|
|
permissions:
|
|
contents: read
|
|
deployments: write
|
|
name: Publish to Cloudflare Pages
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build with Zola
|
|
run: |
|
|
wget -O zola.tar.gz -c https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz
|
|
tar -zxvf zola.tar.gz
|
|
./zola build
|
|
|
|
- name: Publish to Cloudflare Pages
|
|
uses: cloudflare/pages-action@v1
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
projectName: organicmaps
|
|
directory: public
|
|
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|