Skip to content

Commit

Permalink
Modernize actions and clean up repo (PGMDev#136)
Browse files Browse the repository at this point in the history
Signed-off-by: Pear <[email protected]>
  • Loading branch information
TheRealPear authored Aug 27, 2024
1 parent 721bc6b commit d544a28
Show file tree
Hide file tree
Showing 9 changed files with 539 additions and 915 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
58 changes: 58 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy to GitHub Pages

on:
# Triggers after a push on relevant files to the master branch
push:
branches:
- master
paths-ignore:
- '.gitignore'
- 'LICENSE'
- 'README.md'
# Triggers on a manual run
workflow_dispatch:

jobs:
build:
name: Build Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build

- name: Upload build artifact
uses: actions/upload-pages-artifact@v3
with:
path: 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
56 changes: 0 additions & 56 deletions .github/workflows/docs.yml

This file was deleted.

69 changes: 58 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,71 @@
# Dependencies
# Node
## Dependencies
/node_modules

# Production
## Production
/build

# Generated files
## Generated files
.docusaurus
.cache-loader

# Intellij/webstorm
/.idea

# Misc
.DS_Store
.directory
.env.local
## Misc
.env
.env.development.local
.env.test.local
.env.production.local

.env.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Intellij/WebStorm
/.idea

# Notepad++, VS Code, Sublime, Kate
*.bak
.vscode/*
*.sublime-workspace
.*.kate-swp
.swp.*

# Operating systems
## Windows
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
*.stackdump
[Dd]esktop.ini
$RECYCLE.BIN/
*.lnk

## Linux
*~
.fuse_hidden*
.directory
.Trash-*
.nfs*

## macOS
.DS_Store
.AppleDouble
.LSOverride
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Two \r below is intentional
Icon


# end of file
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Follow the steps below to get a working local installation of this documentation

1. Run `npm install` in this project's root folder. This will install all dependencies.
2. Once it's done, run `npm start`. This command starts a local development server and opens up a browser window. Most changes are reflected live without needing to restart the server.
3. Depending where you host it, you can build the website using `npm build` if you intend to upload it yourself, or build it _and_ deploy it to Github pages using `GIT_USER=<Your GitHub username> USE_SSH=true npm deploy`. The later is a convenient way to build the website and push to the `gh-pages` branch.
3. Depending where you host it, you can build the website using `npm run build` if you intend to upload it yourself or build it _and_ deploy it to GitHub pages using the [Action workflow](.github/workflows/deploy.yml).
* Some modifications will be needed to deploy outside the pgm.dev environment.

## How to Contribute

Expand All @@ -23,8 +24,8 @@ Before opening a Pull Request, please:

## Governance

This project is maintained by [CoWinkKeyDinkInc](https://github.com/CoWinkKeyDinkInc), with assistance from [Electroid](https://github.com/Electroid) and other members from the [PGM](https://discord.gg/RTcBe5AKRA) community.
This project is maintained by [CoWinkKeyDinkInc](https://github.com/CoWinkKeyDinkInc), with assistance from [Electroid](https://github.com/Electroid) and other members from the [PGM community](https://discord.gg/RTcBe5AKRA).

## License

> [**Apache-2.0**](https://github.com/PGMDev/Website/blob/master/LICENSE)
> [**Apache-2.0**](LICENSE)
1 change: 1 addition & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config = {
favicon: 'img/favicon.png',
organizationName: 'PGMDev',
projectName: 'Website',
trailingSlash: false,
i18n: {
defaultLocale: 'en',
locales: ['en'],
Expand Down
Loading

0 comments on commit d544a28

Please sign in to comment.