Skip to content

Commit 95901f9

Browse files
authored
Merge pull request #98 from TechLadies/main-update
Update site content, dependencies, and deploy to GitHub Pages
2 parents 052d1ef + 10a0f8f commit 95901f9

52 files changed

Lines changed: 7554 additions & 16048 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main-update
7+
- master
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 18
29+
cache: npm
30+
31+
- name: Set base path
32+
run: |
33+
if [ "${{ github.repository }}" = "plus-hi/techladies-staging" ]; then
34+
echo "NEXT_PUBLIC_BASE_PATH=/techladies-staging" >> $GITHUB_ENV
35+
elif [ "${{ github.repository }}" = "TechLadies/website" ]; then
36+
# Remove this line once custom domain (techladies.co) is configured
37+
echo "NEXT_PUBLIC_BASE_PATH=/website" >> $GITHUB_ENV
38+
fi
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Build
44+
run: npm run build
45+
46+
- name: Add .nojekyll
47+
run: touch out/.nojekyll
48+
49+
- name: Setup Pages
50+
uses: actions/configure-pages@v5
51+
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: out
56+
57+
deploy:
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
runs-on: ubuntu-latest
62+
needs: build
63+
steps:
64+
- name: Deploy to GitHub Pages
65+
id: deployment
66+
uses: actions/deploy-pages@v4

next.config.js

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
1+
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || '';
2+
13
module.exports = {
4+
output: 'export',
5+
basePath: basePath || undefined,
26
trailingSlash: true,
3-
serverRuntimeConfig: {
4-
SENDGRID_API_KEY: process.env.SENDGRID_API_KEY,
5-
},
6-
publicRuntimeConfig: {
7-
// To expose the config to the browser
8-
// SENDGRID_API_KEY: process.env.SENDGRID_API_KEY
9-
},
10-
async redirects() {
11-
return [
12-
{
13-
source: '/bootcamp-7',
14-
destination: '/bootcamp',
15-
permanent: true,
16-
},
17-
{
18-
source: '/mentorship',
19-
destination: '/mentorship',
20-
permanent: true,
21-
},
22-
]
23-
},
247
}

0 commit comments

Comments
 (0)