diff --git a/.github/workflows/scheduled_build.yml b/.github/workflows/scheduled_build.yml index 5b02f96a9..756619df2 100644 --- a/.github/workflows/scheduled_build.yml +++ b/.github/workflows/scheduled_build.yml @@ -1,14 +1,29 @@ -name: Scheduled build +name: GitHub Pages on: + push: + branches: [main] + pull_request: schedule: - cron: '0 3 * * *' jobs: - build: + deploy: runs-on: ubuntu-latest steps: - - name: Trigger build hook on Netlify - run: curl -X POST -s "https://api.netlify.com/build_hooks/${TOKEN}" - env: - TOKEN: ${{ secrets.NETLIFY_CRON_BUILD }} + - uses: actions/checkout@v4 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.71.1' + + - name: Build + run: hugo --minify --buildFuture + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index f5c00eba5..000000000 --- a/netlify.toml +++ /dev/null @@ -1,10 +0,0 @@ -[build] - publish = "public" - command = "hugo" - -[build.environment] - HUGO_VERSION = "0.71.1" - HUGO_BUILDFUTURE = "true" - -[context.deploy-preview.environment] - command = "hugo --baseURL $DEPLOY_PRIME_URL"