Skip to content

Commit

Permalink
Sets up deploying to surge (#3)
Browse files Browse the repository at this point in the history
-changes workflows/static.yml to account for moving to surge
-adds a CNAME
-adds new dependency for surge to package.json
  • Loading branch information
Varlotte authored Feb 25, 2024
1 parent d7c1228 commit 7db4563
Show file tree
Hide file tree
Showing 4 changed files with 927 additions and 22 deletions.
29 changes: 8 additions & 21 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
# Simple workflow for deploying static content to Surge
name: Deploy static content to Surge

on:
# Runs on pushes targeting the default branch
Expand All @@ -9,12 +9,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
Expand All @@ -24,28 +18,21 @@ jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: surge
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload dist repository
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- name: Generate redirect file
run: cp dist/index.html dist/200.html
- name: Deploy to Surge
run: npm run deploy --token ${{ secrets.SURGE_TOKEN }}
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
femmefaust.us
Loading

0 comments on commit 7db4563

Please sign in to comment.