Skip to content

Commit

Permalink
Create CD.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
geunoo authored Dec 28, 2023
1 parent 391a9a4 commit cbd6604
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: afterschool-CD-with-xquare-deployment-action

on:
push:
branches: [ main ]

jobs:
build:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: NodeJS Installation ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: build
run: npm run build
working-directory: ./src

- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Deploy to xquare
uses: team-xquare/xquare-deployment-action@master
with:
environment: YOUR_ENVIRONMENT
access_key: ${{ secrets.ACCESS_KEY }}
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

0 comments on commit cbd6604

Please sign in to comment.