diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..32af3e0 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +on: [push] + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + name: Publish to Cloudflare Pages + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + # extended: true + + - name: Build + run: hugo --minify + + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: b2eab8b024e2fc0155a48c4fc7115e64 + projectName: almalinux-next + directory: public + # Optional: Enable this if you want to have GitHub Deployments triggered + #gitHubToken: ${{ secrets.GITHUB_TOKEN }}