Skip to content

Commit

Permalink
wip: migration from Travis CI to GitHub Actions #149
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-greffe committed Dec 5, 2023
1 parent cd51197 commit ede497d
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,9 @@ jobs:
with:
node-version: ${{ secrets.NODE_VERSION }}
- name: Build & deploy
id: build-deploy
run: |
chmod +x ./.github/workflows/app.sh
./.github/workflows/app.sh
- name: Notify on slack
if: always()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_APPS }}
SLACK_USERNAME: GitHub Actions
SLACK_ICON: https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png
SLACK_COLOR: ${{ steps.build-deploy.outcome == 'success' && 'good' || 'danger' }}
SLACK_MESSAGE: Build of ${{ github.repository }}@${{ github.ref_name }} by ${{ github.actor }} ${{ steps.build-deploy.outcome == 'success' && 'passed' || 'failed' }}
SLACK_FOOTER:
doc:
if: ${{ contains(github.event.head_commit.message, '[build doc]') }}
runs-on: ubuntu-latest
Expand All @@ -44,4 +33,19 @@ jobs:
- name: Deploy doc to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/.vitepress/dist
folder: docs/.vitepress/dist
slackNotification:
name: Notify on slack
runs-on: ubuntu-latest
needs: [app, doc]
steps:
- uses: actions/checkout@v4
- name: Notify on slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_APPS }}
SLACK_USERNAME: GitHub Actions
SLACK_ICON: https://github.githubassets.com/assets/GitHub-Mark-ea2971cee799.png
SLACK_COLOR: ${{ (needs.app.reult == 'success' && needs.doc.reult == 'success') && 'good' || 'danger' }}
SLACK_MESSAGE: Build of ${{ github.repository }}@${{ github.ref_name }} by ${{ github.actor }} ${{ (needs.app.reult == 'success' && needs.doc.reult == 'success') && 'passed' || 'failed' }}
SLACK_FOOTER:

0 comments on commit ede497d

Please sign in to comment.