diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8844e07 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main # or your default branch + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Set up environment variables + run: | + echo "EMAILJS_PUBLIC_KEY=${{ secrets.EMAILJS_PUBLIC_KEY }}" >> $GITHUB_ENV + echo "EMAILJS_SERVICE_ID=${{ secrets.EMAILJS_SERVICE_ID }}" >> $GITHUB_ENV + echo "EMAILJS_TEMPLATE_ID=${{ secrets.EMAILJS_TEMPLATE_ID }}" >> $GITHUB_ENV + + - name: Build + run: npm run build -- --configuration production --base-href "https://javeedishaq.github.io/" + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: dist/ngdevfolio/browser + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/angular.json b/angular.json index 08622df..d926773 100644 --- a/angular.json +++ b/angular.json @@ -16,7 +16,7 @@ "customWebpackConfig": { "path": "./custom-webpack.config.js" }, - "outputPath": "dist/ngdevfolio", + "outputPath": "dist/ngdevfolio/browser", "index": "src/index.html", "main": "src/main.ts", "polyfills": [ diff --git a/src/404.html b/src/404.html new file mode 100644 index 0000000..6a97727 --- /dev/null +++ b/src/404.html @@ -0,0 +1,24 @@ + + +
+ +