diff --git a/.github/workflows/update-doc.yaml b/.github/workflows/update-doc.yaml new file mode 100644 index 0000000..2b1d5c3 --- /dev/null +++ b/.github/workflows/update-doc.yaml @@ -0,0 +1,42 @@ +name: Update Doc + +on: + schedule: + - cron: '0 0 * * 0' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node Environment + uses: actions/setup-node@v4.0.0 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21.x + + - name: Update Docs + working-directory: . + run: | + curl -LO https://raw.githubusercontent.com/projectdiscovery/utils/main/scripts/docupdater/docupdater.go + go run docupdater.go + + - name: Commit results to Github + run: | + git pull + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -m "Update Docs (from GH Actions)" -a --allow-empty + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} +