Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github.token as default credential #28

Open
RammusXu opened this issue Aug 17, 2020 · 2 comments
Open

Add github.token as default credential #28

RammusXu opened this issue Aug 17, 2020 · 2 comments

Comments

@RammusXu
Copy link
Contributor

RammusXu commented Aug 17, 2020

ref: https://rammusxu.github.io/toolkit/snippets/github-action/#but-githubtoken-can-be-get-in-actionyaml

It's a little trick.
Do you think it's ok to add this since almost every use this action to deploy in same repo. And default github action have enough permission.

# action.yaml
inputs:
  auth_token:
    description: 'Auth token used to API'
    required: true
    default: "${{ github.token }}

So, It would be more UX friendly.

name: Publish docs via GitHub Pages
on:
  push:
    branches:
      - master

jobs:
  build:
    name: Deploy docs
    runs-on: ubuntu-latest
    steps:
      - name: Checkout master
        uses: actions/checkout@v1

      - name: Deploy docs
        uses: mhausenblas/mkdocs-deploy-gh-pages@master

I can create a PR if you think it's ok.

@mhausenblas
Copy link
Owner

Thanks @RammusXu and a PR would be appreciated!

@ThiefMaster
Copy link

This would still be nice - less noise in the yaml file that way :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants