diff --git a/.github/workflows/check_lint.yaml b/.github/workflows/check_lint.yaml new file mode 100644 index 00000000..3b49ba49 --- /dev/null +++ b/.github/workflows/check_lint.yaml @@ -0,0 +1,21 @@ +name: check lint +on: + pull_request: + branches: + - "main" + - "dev" +jobs: + check-lint: + runs-on: ubuntu-latest + steps: + - name: pull code to computer + uses: actions/checkout@v4 + - name: install node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: check lint + run: | + npm install + npm run lint + echo "You're code is pretty!" \ No newline at end of file diff --git a/.github/workflows/deploy_preview.yaml b/.github/workflows/deploy_preview.yaml new file mode 100644 index 00000000..8378e9cf --- /dev/null +++ b/.github/workflows/deploy_preview.yaml @@ -0,0 +1,25 @@ +name: deploy preview +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches: + - "dev" +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - name: pull code to computer + uses: actions/checkout@v4 + - name: install node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: install vercel cli + run: npm install -g vercel + - name: deploy to vercel as preview + run: | + vercel pull --yes --token=${{ secrets.VERCEL_TOKEN }} + vercel build --token=${{ secrets.VERCEL_TOKEN }} + vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/deploy_production.yaml b/.github/workflows/deploy_production.yaml new file mode 100644 index 00000000..de1840b8 --- /dev/null +++ b/.github/workflows/deploy_production.yaml @@ -0,0 +1,25 @@ +name: deploy production +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches: + - "main" +jobs: + deploy-production: + runs-on: ubuntu-latest + steps: + - name: pull code to computer + uses: actions/checkout@v4 + - name: install node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - name: install vercel cli + run: npm install -g vercel + - name: deploy to vercel as production + run: | + vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index a547bf36..780371fe 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ lerna-debug.log* node_modules dist -dist-ssr +dist-ssg *.local # Editor directories and files @@ -22,3 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? +.vercel diff --git a/index.html b/index.html index 0c589ecc..7b3ce87a 100644 --- a/index.html +++ b/index.html @@ -4,10 +4,10 @@ -