Skip to content

Commit c63e6a1

Browse files
2 parents dc283ff + ade13a1 commit c63e6a1

File tree

4 files changed

+85
-5
lines changed

4 files changed

+85
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
# Review gh actions docs if you want to further define triggers, paths, etc
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9+
10+
jobs:
11+
build:
12+
name: Build Docusaurus
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
21+
cache: npm
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
- name: Build website
26+
run: npm run build
27+
28+
- name: Upload Build Artifact
29+
uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: build
32+
33+
deploy:
34+
name: Deploy to GitHub Pages
35+
needs: build
36+
37+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
38+
permissions:
39+
pages: write # to deploy to Pages
40+
id-token: write # to verify the deployment originates from an appropriate source
41+
42+
# Deploy to the github-pages environment
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.github/workflows/test-deploy.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Test deployment
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
# Review gh actions docs if you want to further define triggers, paths, etc
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9+
10+
jobs:
11+
test-deploy:
12+
name: Test deployment
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
21+
cache: npm
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
- name: Test build website
26+
run: npm build

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dataforanimals.org

docusaurus.config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ import {themes as prismThemes} from 'prism-react-renderer';
1010

1111
/** @type {import('@docusaurus/types').Config} */
1212
const config = {
13-
title: 'My Site',
14-
tagline: 'Dinosaurs are cool',
13+
title: 'Data for Animals',
14+
tagline: 'Making data open and accessible for animal advocates everywhere',
1515
favicon: 'img/favicon.ico',
1616

1717
// Set the production url of your site here
18-
url: 'https://your-docusaurus-site.example.com',
18+
url: 'https://dataforanimals.org',
1919
// Set the /<baseUrl>/ pathname under which your site is served
2020
// For GitHub pages deployment, it is often '/<projectName>/'
2121
baseUrl: '/',
2222

2323
// GitHub pages deployment config.
2424
// If you aren't using GitHub pages, you don't need these.
25-
organizationName: 'facebook', // Usually your GitHub org/user name.
26-
projectName: 'docusaurus', // Usually your repo name.
25+
organizationName: 'Data-for-Animals', // Usually your GitHub org/user name.
26+
projectName: 'website', // Usually your repo name.
27+
deploymentBranch: 'main',
28+
trailingSlash: 'false',
2729

2830
onBrokenLinks: 'throw',
2931
onBrokenMarkdownLinks: 'warn',

0 commit comments

Comments
 (0)