Skip to content

Commit

Permalink
ci: try ci
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Dec 10, 2023
1 parent 3eb8b5a commit 9c79902
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
files: ./lcov.info,./clover.xml
directory: ./coverage/
verbose: true
# テスト成功時はこちらのステップが実行される
- name: Slack Notification on Success at Testing Stage
if: success()
uses: rtCamp/action-slack-notify@v2
Expand All @@ -55,7 +54,7 @@ jobs:
SLACK_TITLE: Test Success
SLACK_COLOR: good
SLACK_FOOTER: 'Powered by Yancey Inc. and its affiliates.'
# テスト失敗時はこちらのステップが実行される

- name: Slack Notification on Failure at Testing Stage
uses: rtCamp/action-slack-notify@v2
if: failure()
Expand All @@ -71,8 +70,38 @@ jobs:
needs: test
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4

- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Compilation
run: pnpm run build

- name: Copy file via ssh key
uses: appleboy/scp-action@v0.1.4
with:
Expand All @@ -82,14 +111,16 @@ jobs:
key: ${{ secrets.SSH_KEY }}
source: 'build'
target: '/var/www/leetcode-trip'

- uses: actions/checkout@v4

- name: Algoria DocSearch Crawler
uses: darrenjennings/algolia-docsearch-action@master
with:
algolia_application_id: ${{ secrets.ALGORIA_APP_ID }}
algolia_api_key: ${{ secrets.ALGORIA_API_KEY }}
file: './algolia-config.json'
# テスト成功時はこちらのステップが実行される

- name: Slack Notification on Success at Deployment Stage
if: success()
uses: rtCamp/action-slack-notify@v2
Expand All @@ -99,7 +130,7 @@ jobs:
SLACK_TITLE: Deploy Success
SLACK_COLOR: good
SLACK_FOOTER: 'Powered by Yancey Inc. and its affiliates.'
# テスト失敗時はこちらのステップが実行される

- name: Slack Notification on Failure at Deployment Stage
uses: rtCamp/action-slack-notify@v2
if: failure()
Expand Down

0 comments on commit 9c79902

Please sign in to comment.