From 6e7c6316a323cfa14d955cedb6a4835de89f1b8f Mon Sep 17 00:00:00 2001 From: 3design Date: Tue, 1 Oct 2024 09:36:42 -0400 Subject: [PATCH] #1 Create build-and-deploy.yml --- .github/workflows/build-and-deploy.yml | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build-and-deploy.yml diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 0000000..fe16857 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,34 @@ +name: Build and Deploy + +on: + push: + branches: ['main'] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: ['20.9.0'] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install packages + run: npm ci + + - name: Run npm build + run: npm run build + + - name: Deploy to gh-pages branch + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} + publish_dir: ./dist