Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update workflow file #15

Merged
merged 9 commits into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [main]
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

Expand All @@ -20,23 +23,36 @@ jobs:
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3
- name: Install, build, and upload your site
uses: withastro/action@v1
- name: Setup pnpm
uses: pnpm/action-setup@v2.4.0
with:
path: /docs
package-manager: pnpm@latest
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)

version: 8.x
- name: Install dependencies
run: cd docs && pnpm install
- name: Build
run: cd docs && pnpm build
- name: Upload artifacts
uses: actions/upload-pages-artifact@v2.0.0
with:
path: docs/dist/

deploy:
# Add a dependency to the build job
needs: build
runs-on: ubuntu-latest

# 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 }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v3 # or specific "vX.X.X" version tag for this action
4 changes: 2 additions & 2 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default defineConfig({
label: "Guides",
items: [
// Each item here is one entry in the navigation menu.
{ label: "Usage", link: "/guides/usage/" },
{ label: "Hosting", link: "/guides/hosting/" },
{ label: "Usage", link: "/go-fast-cdn/guides/usage/" },
{ label: "Hosting", link: "/go-fast-cdn/guides/hosting/" },
],
},
],
Expand Down
8 changes: 4 additions & 4 deletions docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hero:
file: ../../assets/gopher.png
actions:
- text: How to use
link: /guides/usage/
link: /go-fast-cdn/guides/usage/
icon: right-arrow
variant: primary
- text: Leave a star on Github
Expand All @@ -26,10 +26,10 @@ import { Card, CardGrid } from "@astrojs/starlight/components";
Github](https://github.com/kevinanielsen/go-fast-cdn/releases).
</Card>
<Card title="Read the docs" icon="open-book">
Go read the usage guide in [the docs](/guides/usage).
Go read the usage guide in [the docs](/go-fast-cdn/guides/usage).
</Card>
<Card title="Host your own CDN" icon="rocket">
[Click here](/guides/hosting) to learn how to host your CDN for free in a
docker container.
[Click here](/go-fast-cdn/guides/hosting) to learn how to host your CDN for
free in a docker container.
</Card>
</CardGrid>
Loading