Skip to content

Commit 26386fe

Browse files
committed
Initial commit
🎉 deps: update deps deps: rm astro/rss deps: npm update deps: major version bump @types/markdown-it deps: minor bump @astrojs/check deps: minor bump uno deps deps: major bump @astrojs/mdx docs: local running docs feat: flesh out pages. Add PDF resume. Add projects
0 parents  commit 26386fe

Some content is hidden

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

50 files changed

+9969
-0
lines changed

.github/workflows/publish.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
push:
3+
branches: [main]
4+
5+
jobs:
6+
publish:
7+
name: Publish to Cloudflare Pages
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
include:
12+
# "project" here corresponds to the name of your project within Cloudflare
13+
# "package" here refers to the name of the site as it is in the monorepo. "project" and "package" may not always be the same
14+
- project: unicorn-demo
15+
package: unicorn-demo
16+
# Deploy multiple sites by adding more matrix entries following this syntax:
17+
# - project: another-project
18+
# package: another-package
19+
# - project: third-project
20+
# package: third-package
21+
22+
permissions:
23+
contents: read
24+
deployments: write
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
30+
- name: Install Dependencies
31+
run: npm ci --omit=dev
32+
33+
- name: Build
34+
run: npm run build -w ./sites/${{ matrix.package }}
35+
36+
- name: Publish to Cloudflare Pages
37+
uses: cloudflare/pages-action@v1
38+
with:
39+
apiToken: ${{ secrets.DEPLOY_TOKEN }}
40+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
41+
projectName: ${{ matrix.project }}
42+
directory: ./sites/${{ matrix.package }}/dist

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# build output
2+
dist/
3+
.output/
4+
./sites/*/dist
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# misc
24+
*.pem
25+
.cache
26+
.astro
27+
.vscode

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 John McGuin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Unicorn
2+
3+
Unicorn is a monorepo to make it easier to deploy websites alongside your job applications allowing you to customize your pages and content to the specific job opportunity. Unicorn provides a GitHub Action that will deploy your sites as Cloudflare Pages.
4+
5+
Now go show your prospective employers what a special unicorn you are.
6+
7+
To use this monorepo, you'll need a Cloudflare account.
8+
9+
## Running A Site
10+
11+
After creating a repo from the template, `cd` into your project directory and run
12+
13+
```bash
14+
npm install
15+
```
16+
17+
This repo uses npm workspaces, so to run a specific site, run:
18+
19+
```bash
20+
npm run dev -w ./sites/unicorn-demo
21+
```
22+
23+
where `unicorn-demo` is the name of the site you're targeting.
24+
25+
## Deployment Instructions
26+
27+
### Create A Cloudflare API Key
28+
29+
1. In your Cloudflare account, navigate to "Profile" -> "API Tokens" -> "Create Token"
30+
2. Under the "Custom token" section, click to create a custom token. Give the token a name and the edit permission to Cloudflare Pages. It should look something like this:
31+
32+
![custom token example screen](./assets/cloudflare_custom_token.png)
33+
34+
### Add GitHub Secrets / Creating Your First Site
35+
36+
1. Copy the token from the previous step and add it as a GitHub secret called `DEPLOY_TOKEN` in your repo.
37+
2. Navigate to the "Workers & Pages" tab. Here you should find your account id. Copy that and add it to your repo as a secret called `CLOUDFLARE_ACCOUNT_ID`.
38+
3. While here, create your first site. Select "create application". Select "Pages" tab. Select "Create using direct upload". Select "Upload assets", although we will be skipping the actual upload of assets (the GH action workflow will do this for us, we just need to create the pages "project" at this point). Give the project a name, and select "Create project" without uploading assets. Take note of the project name you provided. We will use this within the [GitHub action](./.github/workflows/publish.yml#L14).
39+
40+
## Thanks
41+
42+
This project is a minimal fork off of the [Typography](https://github.com/Moeyua/astro-theme-typography) by [Moeyua](https://github.com/Moeyua). Thanks for the design Moeyua!

assets/cloudflare_custom_token.png

310 KB
Loading

0 commit comments

Comments
 (0)