mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Update README.md
This commit is contained in:
parent
455daba3e1
commit
f5a4689a00
25
README.md
25
README.md
@ -7,30 +7,9 @@ This [GitHub action](https://github.com/features/actions) will handle the buildi
|
|||||||
❗️**You can find instructions for using version 1 of the GitHub Actions workflow format [here](https://github.com/JamesIves/github-pages-deploy-action/tree/1.1.3).**
|
❗️**You can find instructions for using version 1 of the GitHub Actions workflow format [here](https://github.com/JamesIves/github-pages-deploy-action/tree/1.1.3).**
|
||||||
|
|
||||||
## Getting Started :airplane:
|
## Getting Started :airplane:
|
||||||
You can include the action in your workflow to trigger on any event that [GitHub actions](https://github.com/features/actions) supports. If the remote branch that you wish to deploy to doesn't already exist the action will create it for you.
|
You can include the action in your workflow to trigger on any event that [GitHub actions](https://github.com/features/actions) supports. If the remote branch that you wish to deploy to doesn't already exist the action will create it for you. Your workflow will also need to include the `actions/checkout` step before this workflow runs in order for the deployment to work.
|
||||||
|
|
||||||
Your workflow will also need to include the `actions/checkout` step before this workflow runs in order for the deployment to work. You can view an example of this below.
|
You can view an example of this below.
|
||||||
|
|
||||||
```yml
|
|
||||||
name: Build and Deploy
|
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
build-and-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
- name: Build and Deploy
|
|
||||||
uses: JamesIves/github-pages-deploy-action@master
|
|
||||||
env:
|
|
||||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
||||||
BRANCH: gh-pages
|
|
||||||
FOLDER: build
|
|
||||||
BUILD_SCRIPT: npm install && npm run-script build
|
|
||||||
```
|
|
||||||
|
|
||||||
You can combine it with the filter action so it only triggers deploys on a specific branch.
|
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
name: Build and Deploy
|
name: Build and Deploy
|
||||||
|
Loading…
Reference in New Issue
Block a user