From dcd7c65ef1f7266a4d5fe0b05fd705c51eab2017 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Thu, 13 Feb 2025 18:23:19 +0100 Subject: [PATCH] ci: deploy to Cloudflare Pages --- .github/workflows/publish.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..fb558f4 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,34 @@ +name: publish +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: "Clone submodules" + run: | + git submodule update --init --recursive + mkdir -p blog + - uses: peaceiris/actions-hugo@v3 + with: + hugo-version: 'latest' + extended: true + - uses: purcell/setup-emacs@master + with: + version: 29.1 + - name: "Export org to md" + run: emacs -Q --script .export.el + - name: "Hugo export" + run: hugo -d blog + - name: "Deploy to Cloudflare Pages" + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.ACCOUNT_ID }} + projectName: conlang-phundrak-com + directory: docs/.vuepress/dist/ + githubToken: ${{ secrets.TOKEN }}