From 2ed89cc50d89c81fbbe9e624be150ad5c1029d7e Mon Sep 17 00:00:00 2001 From: Nya Candy Date: Tue, 28 May 2024 19:32:46 +0800 Subject: [PATCH] feat(ci): init --- .../workflows/build-contributors-graph.yml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build-contributors-graph.yml diff --git a/.github/workflows/build-contributors-graph.yml b/.github/workflows/build-contributors-graph.yml new file mode 100644 index 0000000..6df551f --- /dev/null +++ b/.github/workflows/build-contributors-graph.yml @@ -0,0 +1,43 @@ +name: Build contributors graph + +on: + schedule: + - "0 0 * * 0" + workflow_dispatch: + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.22' + + - name: Generate Contributors Graph + run: go run . + env: + TOKEN: ${{ github.token }} + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: "contributors-graph" + path: contributors.svg + + deploy: + needs: build + + permissions: + pages: write + id-token: write + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 + with: + artifact_name: "contributors-graph"