Skip to content

Commit

Permalink
Create doc-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinMartinDev committed Aug 14, 2024
1 parent 764b527 commit aa7aa1a
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 10 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/doc-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: docs

- name: Build website
run: yarn build
working-directory: docs

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 3 additions & 3 deletions docs/docs/available-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ The page will reload if you make edits. You will also see any lint errors in the

## `npm test`

Launches the test runner in the interactive watch mode. See the section about [running tests](running-tests.md) for more information.
Launches the test runner in the interactive watch mode. See the section about **** for more information.

## `npm run build`

Builds the app for production to the `build` folder. It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes. If necessary, classnames and function names can be enabled for profiling purposes. See the [production build](production-build.md) section for more information.
The build is minified and the filenames include the hashes. If necessary, classnames and function names can be enabled for profiling purposes. See the **** section for more information.

Your app is ready to be deployed! See the section about [deployment](deployment.md) for more information about deploying your application to popular hosting providers.
Your app is ready to be deployed! See the section about **** for more information about deploying your application to popular hosting providers.

## `npm run eject`

Expand Down
10 changes: 3 additions & 7 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const config: Config = {
favicon: "img/favicon.ico",

// Set the production url of your site here
url: "https://your-docusaurus-site.example.com",
url: "https://create-fivem-resource.dev",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
Expand Down Expand Up @@ -76,18 +76,14 @@ const config: Config = {
title: "Docs",
items: [
{
label: "Welcome",
to: "/docs/documentation-intro",
label: "Getting Started",
to: "/docs/getting-started",
},
],
},
{
title: "More",
items: [
{
label: "Blog",
to: "/blog",
},
{
label: "GitHub",
href: "https://github.com/JustinMartinDev/create-fivem-resource",
Expand Down

0 comments on commit aa7aa1a

Please sign in to comment.