Skip to content

Commit

Permalink
ci: add npm caching
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-karan committed Jul 1, 2024
1 parent b0f5a40 commit fe39585
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 54 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Cache node modules
uses: actions/cache@v3
with:
path: ./docs/node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/docs/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install dependencies
run: |
cd docs
yarn install
- name: Build
run: |
cd docs
yarn build
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ builds:
- -s -w -X "main.buildVersion={{ .Tag }} ({{ .ShortCommit }} {{ .Date }})"
main: ./web/
hooks:
pre: sh -c 'cd ./docs/ && yarn build'
pre: sh -c 'cd ./docs/ && yarn && yarn build'

archives:
- id: cli
Expand Down
104 changes: 51 additions & 53 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,58 +1,56 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import { defineConfig, passthroughImageService } from "astro/config";

// https://astro.build/config
export default defineConfig({
image: {
service: passthroughImageService(),
},
integrations: [
starlight({
title: 'Doggo',
customCss: [
'./src/assets/custom.css',
],
social: {
github: 'https://github.com/mr-karan/doggo',
},
sidebar: [
{
label: 'Introduction',
items: [
{ label: 'Installation', link: '/intro/installation' },
],
},
{
label: 'Usage Guide',
items: [
{ label: 'Examples', link: '/guide/examples' },
{ label: 'CLI Reference', link: '/guide/reference' },
],
},
{
label: 'Resolvers',
items: [
{ label: 'Classic (UDP and TCP)', link: '/resolvers/classic' },
{ label: 'System', link: '/resolvers/system' },
{ label: 'DNS over HTTPS (DoH)', link: '/resolvers/doh' },
{ label: 'DNS over TLS (DoT)', link: '/resolvers/dot' },
{ label: 'DNSCrypt', link: '/resolvers/dnscrypt' },
{ label: 'DNS over HTTPS (DoQ)', link: '/resolvers/quic' },
],
},
{
label: 'Features',
items: [
{ label: 'Output Formats', link: '/features/output' },
{ label: 'Multiple Resolvers', link: '/features/multiple' },
{ label: 'IPv4 and IPv6', link: '/features/ip' },
{ label: 'Reverse IP Lookups', link: '/features/reverse' },
{ label: 'Protocol Tweaks', link: '/features/tweaks' },
{ label: 'Shell Completions', link: '/features/shell' },
],
},
],
}),
],
base: "/docs",
site: "https://doggo.karan.dev/docs",
image: {
service: passthroughImageService(),
},
integrations: [
starlight({
title: "Doggo",
customCss: ["./src/assets/custom.css"],
social: {
github: "https://github.com/mr-karan/doggo",
},
sidebar: [
{
label: "Introduction",
items: [{ label: "Installation", link: "/intro/installation" }],
},
{
label: "Usage Guide",
items: [
{ label: "Examples", link: "/guide/examples" },
{ label: "CLI Reference", link: "/guide/reference" },
],
},
{
label: "Resolvers",
items: [
{ label: "Classic (UDP and TCP)", link: "/resolvers/classic" },
{ label: "System", link: "/resolvers/system" },
{ label: "DNS over HTTPS (DoH)", link: "/resolvers/doh" },
{ label: "DNS over TLS (DoT)", link: "/resolvers/dot" },
{ label: "DNSCrypt", link: "/resolvers/dnscrypt" },
{ label: "DNS over HTTPS (DoQ)", link: "/resolvers/quic" },
],
},
{
label: "Features",
items: [
{ label: "Output Formats", link: "/features/output" },
{ label: "Multiple Resolvers", link: "/features/multiple" },
{ label: "IPv4 and IPv6", link: "/features/ip" },
{ label: "Reverse IP Lookups", link: "/features/reverse" },
{ label: "Protocol Tweaks", link: "/features/tweaks" },
{ label: "Shell Completions", link: "/features/shell" },
],
},
],
}),
],
});

0 comments on commit fe39585

Please sign in to comment.