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 }}