Skip to content

Commit

Permalink
Add CNAME
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-ping committed Dec 30, 2023
1 parent 3c13119 commit ec2d054
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,21 @@ jobs:
# Checks out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v4

- name: Detect package manager
id: detect-package-manager
run: |
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm

- name: Setup Pages
uses: actions/configure-pages@v4
with:
Expand All @@ -55,6 +58,7 @@ jobs:
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next

- name: Restore cache
uses: actions/cache@v3
with:
Expand All @@ -65,12 +69,23 @@ jobs:
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Install dependencies
run: npm ci

- name: Build with Next.js
run: npx next build

- name: Static HTML export with Next.js
run: npx next export

- name: Add CNAME and a README to artifact
run: |
echo "samuelp.ing" > out/CNAME
echo "# Hi!" > out/README.md
echo "You're currently looking at the build artifacts of my website. To check out the code, switch over to the [Main branch](https://github.com/samuel-ping/personal-website-v3)!" >> out/README.md
echo "#### Note - This message was automatically generated." >> out/README.md
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down

0 comments on commit ec2d054

Please sign in to comment.