Update README.md

This commit is contained in:
Michaël De Boey authored and GitHub committed 2021-06-18 13:45:45 +02:00
1 parent 1a483dfcb5
commit 67ad4114f0
1 file changed
-33
-33
View File
@@ -20,15 +20,9 @@ The next example step will deploy `./public` directory to the remote `gh-pages`
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
``` ```
For newbies of GitHub Actions:
Note that the `GITHUB_TOKEN` is **NOT** a personal access token.
A GitHub Actions runner automatically creates a `GITHUB_TOKEN` secret to authenticate in your workflow.
So, you can start to deploy immediately without any configuration.
## Supported Tokens ## Supported Tokens
@@ -157,7 +151,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
``` ```
@@ -222,7 +215,6 @@ The default is `gh-pages`.
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: your-branch # default: gh-pages publish_branch: your-branch # default: gh-pages
``` ```
@@ -234,7 +226,6 @@ A source directory to deploy to GitHub Pages. The default is `public`.
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out # default: public publish_dir: ./out # default: public
``` ```
@@ -249,7 +240,6 @@ A destination subdirectory on a publishing branch. The default is empty.
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir: subdir destination_dir: subdir
``` ```
@@ -266,7 +256,6 @@ Values should be split with a comma.
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
exclude_assets: '.github,exclude-file1,exclude-file2' exclude_assets: '.github,exclude-file1,exclude-file2'
``` ```
@@ -278,7 +267,6 @@ Set `exclude_assets` to empty for including the `.github` directory to deploymen
with: with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} # Recommended for this usage deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} # Recommended for this usage
# personal_token: ${{ secrets.PERSONAL_TOKEN }} # An alternative # personal_token: ${{ secrets.PERSONAL_TOKEN }} # An alternative
# github_token: ${{ secrets.GITHUB_TOKEN }} # This does not work for this usage
exclude_assets: '' exclude_assets: ''
``` ```
@@ -288,7 +276,6 @@ The `exclude_assets` option supports glob patterns.
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
exclude_assets: '.github,exclude-file.txt,exclude-dir/**.txt' exclude_assets: '.github,exclude-file.txt,exclude-dir/**.txt'
``` ```
@@ -303,7 +290,6 @@ For more details about the `CNAME` file, read the official documentation: [Manag
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
cname: github.com cname: github.com
``` ```
@@ -323,7 +309,6 @@ Bypassing Jekyll makes the deployment faster and is necessary if you are deployi
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
enable_jekyll: true enable_jekyll: true
``` ```
@@ -340,7 +325,6 @@ For example:
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
allow_empty_commit: true allow_empty_commit: true
``` ```
@@ -360,7 +344,6 @@ For example:
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
keep_files: true keep_files: true
``` ```
@@ -406,7 +389,6 @@ This allows you to make your publish branch with only the latest commit.
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
force_orphan: true force_orphan: true
``` ```
@@ -420,7 +402,6 @@ A commit is always created with the same user.
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
user_name: 'github-actions[bot]' user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com' user_email: 'github-actions[bot]@users.noreply.github.com'
@@ -437,7 +418,6 @@ When we create a commit with a message `docs: Update some post`, a deployment co
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
commit_message: ${{ github.event.head_commit.message }} commit_message: ${{ github.event.head_commit.message }}
``` ```
@@ -451,7 +431,6 @@ use the `full_commit_message` option instead of the `commit_message` option.
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
full_commit_message: ${{ github.event.head_commit.message }} full_commit_message: ${{ github.event.head_commit.message }}
``` ```
@@ -489,7 +468,6 @@ jobs:
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }} tag_name: ${{ steps.prepare_tag.outputs.deploy_tag_name }}
tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}' tag_message: 'Deployment ${{ steps.prepare_tag.outputs.tag_name }}'
@@ -661,7 +639,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
``` ```
@@ -709,7 +686,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
``` ```
@@ -762,7 +738,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out publish_dir: ./out
``` ```
@@ -811,7 +786,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist publish_dir: ./dist
``` ```
@@ -868,7 +842,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build publish_dir: ./website/build
``` ```
@@ -928,7 +901,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site publish_dir: ./site
``` ```
@@ -967,7 +939,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book publish_dir: ./book
``` ```
@@ -1009,7 +980,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/web publish_dir: ./build/web
``` ```
@@ -1056,7 +1026,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public publish_dir: ./public
``` ```
@@ -1084,7 +1053,6 @@ jobs:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./ publish_dir: ./
allow_empty_commit: true allow_empty_commit: true
enable_jekyll: true enable_jekyll: true
@@ -1138,7 +1106,6 @@ jobs:
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./Output publish_dir: ./Output
``` ```