Last active
January 31, 2020 14:38
-
-
Save Tetsuya-Minase/73d969597939aa96badef2b9e6255c82 to your computer and use it in GitHub Desktop.
github actions yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-sample-workflow | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: setup | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- name: install and setup config | |
run: | | |
npm install | |
npm run config -- credentials --provider aws --key ${{secrets.SLS_KEY}} --secret ${{secrets.SLS_SEC}} | |
- name: deploy | |
run: npm run deploy -- --webhook=${{secrets.SLS_HOOK}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sample-workflow | |
on: | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: setup | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- name: install and setup config | |
run: npm install | |
- name: lint | |
run: npm run lint:format | |
- name: test | |
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: slack-sample-workflow | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: setup | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- name: install | |
run: npm install | |
- name: build | |
run: npm run generate | |
- name: deploy | |
run: npm run deploy:only -- --token=${{secrets.token}} | |
- name: slack-notice-failure | |
if: failure() | |
uses: rtCamp/action-slack-notify@v2.0.0 | |
env: | |
SLACK_CHANNEL: 'チャンネル名' | |
SLACK_COLOR: '#3278BD' | |
SLACK_MESSAGE: 'メッセージ' | |
SLACK_TITLE: 'タイトル' | |
SLACK_USERNAME: '名前' | |
SLACK_WEBHOOK: ${{ secrets.SLACK_TOKEN }} | |
- name: slack-notice-success | |
if: success() | |
uses: rtCamp/action-slack-notify@v2.0.0 | |
env: | |
SLACK_CHANNEL: 'チャンネル名' | |
SLACK_COLOR: '#3278BD' | |
SLACK_MESSAGE: 'メッセージ' | |
SLACK_TITLE: 'タイトル' | |
SLACK_USERNAME: '名前' | |
SLACK_WEBHOOK: ${{ secrets.SLACK_TOKEN }} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment