chore: update rss updating process in github action with persoanl access token

This commit is contained in:
Anda Toshiki 2023-04-02 12:14:40 +08:00
parent 9778a7afa0
commit afd018cd1d

View File

@ -8,33 +8,33 @@ on:
jobs: jobs:
update: update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out the latest commit of the repository history - name: Check out the latest commit of the repository history
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
token: ${{ secrets.GH_PAT }} token: ${{ secrets.GH_PAT }}
- name: Set up node environment - name: Set up node environment
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 16 node-version: 16
- name: Install node dependencies for running build - name: Install node dependencies for running build
run: | run: |
yarn install yarn install
yarn lint yarn lint
- name: Generate RSS feeds from source into Markdown formatting - name: Generate RSS feeds from source into Markdown formatting
run: | run: |
yarn generate yarn generate
- name: Commit changed README file and push changes to repository - name: Commit changed README file and push changes to repository
run: | run: |
git diff git diff
git config --global user.email "hello@toshiki.dev" git config --global user.email "hello@toshiki.dev"
git config --global user.name "@andatoshiki" git config --global user.name "@andatoshiki"
git add -A git add -A
git commit -a -m 'chore(update): update readme with the latest rss feeds' || exit 0 git commit -a -m 'chore(update): update readme with the latest rss feeds' || exit 0
git push -f origin master git push -f origin master
- name: Push changes to remote repository - name: Push changes to remote repository
uses: ad-m/github-push-action@master uses: ad-m/github-push-action@master
with: with:
github_token: ${{ secrets.GH_PAT }} # personal access token github_token: ${{ secrets.GH_PAT }} # personal access token
branch: ${{ github.ref }} branch: ${{ github.ref }}