feat(workflow): i'll deploy using my own vps
This commit is contained in:
42
.github/workflows/deploy.yml
vendored
42
.github/workflows/deploy.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
name: Deploy to S3
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: "18"
|
|
||||||
|
|
||||||
- name: Install pnpm
|
|
||||||
run: |
|
|
||||||
npm install -g pnpm
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
pnpm install
|
|
||||||
|
|
||||||
- name: Build project
|
|
||||||
run: |
|
|
||||||
GH_PAT=${{ secrets.GH_PAT }} \
|
|
||||||
pnpm build
|
|
||||||
|
|
||||||
- name: Deploy to S3
|
|
||||||
run: |
|
|
||||||
aws s3 sync ./dist s3://$AWS_BUCKET_NAME --delete
|
|
||||||
env:
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
AWS_REGION: ${{ secrets.AWS_REGION }}
|
|
||||||
AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME }}
|
|
||||||
Reference in New Issue
Block a user