Merge pull request #708 from kumja1/wiki-4 #1519
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 | |
on: | |
push: | |
branches: | |
- wiki | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy π | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
cache: npm | |
cache-dependency-path: package-lock.json | |
node-version-file: .nvmrc | |
- name: Install Project π§ | |
run: npm install | |
- name: Check Linting π | |
run: npm run lint | |
- name: Check Build π§ | |
run: npm run build | |
- name: Deploy π | |
uses: JamesIves/[email protected] | |
with: | |
branch: generated | |
folder: docs/.vitepress/dist | |
- name: Bully someone into fixing it | |
if: ${{ failure() }} | |
uses: Bedrock-OSS/[email protected] | |
with: | |
webhook: https://canary.discord.com/api/webhooks/${{ secrets.WEBHOOK_ID }}/${{ secrets.WEBHOOK_TOKEN }} | |
tenorGifApiKey: ${{ secrets.TENOR_GIF_API_KEY }} | |
failMessage: I blame %author% <:PE_PandaBonk:885395101877166110> | |
failTitle: 'Wiki deployment failed!' | |
failAuthor: 'You messed up' | |
gifFailQuery: fail | |
successTitle: 'Wiki deployment succeeded!' | |
successMessage: Thank you, %author%! <:PE_PandaInLove:885395799029194853> | |
gifSuccessQuery: success | |
successAuthor: 'You did it' | |
failed: 'true' | |
- name: Send a message if previous build failed | |
if: ${{ success() }} | |
uses: Bedrock-OSS/[email protected] | |
with: | |
webhook: https://canary.discord.com/api/webhooks/${{ secrets.WEBHOOK_ID }}/${{ secrets.WEBHOOK_TOKEN }} | |
tenorGifApiKey: ${{ secrets.TENOR_GIF_API_KEY }} | |
failMessage: I blame %author% <:PE_PandaBonk:885395101877166110> | |
failTitle: 'Wiki deployment failed!' | |
failAuthor: 'You messed up' | |
gifFailQuery: fail | |
successTitle: 'Wiki deployment succeeded!' | |
successMessage: Thank you, %author%! <:PE_PandaInLove:885395799029194853> | |
gifSuccessQuery: success | |
successAuthor: 'You did it' | |
failed: 'false' |