From ff975f798d893ebfd50f4c8563b3a549872f9ede Mon Sep 17 00:00:00 2001 From: "James R. Cogley" Date: Mon, 25 Nov 2024 11:23:58 +0900 Subject: [PATCH] add gh workflow to automate --- .github/workflows/update-profile-readme.yml | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/update-profile-readme.yml diff --git a/.github/workflows/update-profile-readme.yml b/.github/workflows/update-profile-readme.yml new file mode 100644 index 0000000..622e247 --- /dev/null +++ b/.github/workflows/update-profile-readme.yml @@ -0,0 +1,49 @@ +name: Update Profile README + +on: + push: + # Run on main branch pushes or PRs + branches: [main] + pull_request: + branches: [ "main" ] + # Allow to manually trigger the workflow + workflow_dispatch: + schedule: + # Rebuild every day at 16:30 PM UTC + - cron: "30 16 * * *" + +jobs: + build: + # What OS to use + runs-on: ubuntu-latest + # Allow commits to the repository + permissions: + id-token: write + contents: write + pages: write + + # What steps to run + steps: + - name: Clone repository + # Git clone the repository + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - name: Setup Deno environment + # Downloads deno and caches it + uses: denoland/setup-deno@v2 + with: + # Latest Deno 2.x version + deno-version: v2.x + + - name: Build site + # Run the build script from deno.json + run: deno task build + + - name: Commit changes + # Commit the changes to the repository + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Apply changes during gh actions build + status_options: '--untracked-files=no'