Skip to content

wu-yu-xuan/deploy-github-pages

Repository files navigation

deploy-github-pages

wtfpl badge GitHub code size in bytes

How To Use It?

Generate Token

Go to Personal Access Tokens generate new token

Access to repo is needed

Copy and store this token, github won't store it for safety

Add Secrets

Go to https://github.com/{yourName}/{yourRepo}/settings/secrets

Add a new secret, key is PERSONAL_TOKEN, value is the token you just generated

Create Workflow

Create /.github/workflows/{anyNameYouLike}.yml

Content is like:

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2
      # use any other action here
      - name: deploy
        uses: wu-yu-xuan/deploy-github-pages@action
        with:
          personal_token: ${{ secrets.PERSONAL_TOKEN }} # important
          commit_message: ${{ github.event.head_commit.message }}
          publish_branch: gh-pages
          source_dir: build
          publish_dir: ./
          publish_repo: # like userName/repoName, default is current repo
          keep_files: false

or you can read

for more information

Who Is Using It?


If you have trouble using it or have used it, let me known!

About

deploy github pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published