Skip to content

Commit

Permalink
feat(deno): migrate build and deploy to deno 2 (#3)
Browse files Browse the repository at this point in the history
* build(deno): migrate to deno 2 build

* fix(deno): resolve `astro dev` exceeds OS open files limit (os error 24)

issue: denoland/deno#17757

* build(deps): bump astro

* build(deno): action to deploy using deno

* fix(deno): remove broken step (test)

* fix(deno): update step

* fix(deno): add version to action path

* fix: add `uses` to deploy step

* refactor: update extension, deno install scripts, add pages step

* test: add text to validate deployment

* fix: update upload artifact to upload the `dist/` dir not `dist` file

* fix: LHTW

* fix: use correct repo `actions/upload-artifact@v4`

* fix: add id to upload artifact step

* fix: name artifact `github-pages`

* fix: try artifact v3

* fix: revert to artifact v4

* fix: use `actions/upload-pages-artifact@v3`

actions/deploy-pages#345

* chore: remove test
  • Loading branch information
Indyandie authored Oct 21, 2024
1 parent 7954126 commit edf974f
Show file tree
Hide file tree
Showing 10 changed files with 3,014 additions and 6,210 deletions.
2 changes: 1 addition & 1 deletion .astro/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1721361541660
"lastUpdateCheck": 1729406691534
}
}
1 change: 1 addition & 0 deletions .astro/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
51 changes: 51 additions & 0 deletions .github/workflows/deno.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# For more information see: https://github.com/denoland/setup-deno

name: Deno

on:
push:
branches: ["deno"]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Run install
run: deno install --allow-scripts
- name: Run Build
run: deno run -A build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: "./dist/"

deploy:
needs: build
runs-on: ubuntu-latest
# name: Deploy
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
18 changes: 13 additions & 5 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import { defineConfig } from 'astro/config';
import svelte from "@astrojs/svelte";
import { defineConfig } from 'astro/config'
import svelte from '@astrojs/svelte'

import tailwind from "@astrojs/tailwind";
import tailwind from '@astrojs/tailwind'

// https://astro.build/config
export default defineConfig({
site: 'https://indyandie.github.io/',
base: 'ebishi/',
integrations: [svelte(), tailwind()]
});
integrations: [svelte(), tailwind()],
vite: {
server: {
watch: {
useFsEvents: false,
usePolling: true,
},
},
},
})
3 changes: 3 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"nodeModuleDir": "manual"
}
Loading

0 comments on commit edf974f

Please sign in to comment.