Skip to content

ci: add deploy to CF pages #8

ci: add deploy to CF pages

ci: add deploy to CF pages #8

Workflow file for this run

#
# This workflow is adapted from guide.ubuntu-mate.org! Changes made here must
# be applied to that repository and vice versa.
#
name: Publish to Web
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt-get install pandoc ruby-html-proofer
- name: Clone Web Repository
run: |
git clone https://github.com/ubuntu-mate/guide.ubuntu-mate.org --depth=1
- name: Build
run: |
cd guide.ubuntu-mate.org/
scripts/build.py ../
- name: Test for errors
run: |
cd guide.ubuntu-mate.org/
scripts/test.sh
- name: Publish to Cloudflare Pages
if: ${{ github.event_name == 'push' && github.repository == 'ubuntu-mate/ubuntu-mate-guide' }}
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: e6fe5e31e8183c8192347f15af553766
projectName: guide-ubuntu-mate-org
directory: build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}