build bundle.js in deployment to github pages
authorAngelo Rodrigues <git@xangelo.ca>
Wed, 25 Jan 2023 15:07:49 +0000 (10:07 -0500)
committerGitHub <noreply@github.com>
Wed, 25 Jan 2023 15:07:49 +0000 (10:07 -0500)
Instead of committing the built file locally, this does the build in GitHub Actions/

.github/workflows/static.yml

index 6a8b68c61155e4761511f204e460317b47815514..44320d01d51ce19e5fba55953a473b183e5ab60e 100644 (file)
@@ -32,6 +32,12 @@ jobs:
         uses: actions/checkout@v3
       - name: Setup Pages
         uses: actions/configure-pages@v2
+      - name: Setup Node
+        uses: actions/setup-node@v3
+        with:
+          node-version: 18.7.0
+      - run: NODE_ENV=production npm i
+      - run: ENVIRONMENT=production npm run build
       - name: Upload artifact
         uses: actions/upload-pages-artifact@v1
         with: