Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommytrg committed Jul 19, 2024
1 parent 5dc645f commit 6f97082
Show file tree
Hide file tree
Showing 4 changed files with 335 additions and 219 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Deploy

# env:
# DEBUG: 'vite:*'

on:
# Runs on pushes targeting the default branch
# push:
# branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Enable corepack
run: corepack enable pnpm

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

# - name: Setup Pages
# uses: actions/configure-pages@v5
# with:
# Automatically inject router.base in your Nuxt configuration file and set
# target to static (https://nuxtjs.org/docs/configuration-glossary/configuration-target/).

# You may remove this line if you want to manage the configuration yourself.
- name: Restore cache
uses: actions/cache@v4
with:
path: |
dist
.nuxt
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }}
restore-keys: |
${{ runner.os }}-nuxt-build-
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Static HTML export with Nuxt
run: pnpm run generate
- name: List files for debugging
run: ls -la ./dist
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist

# Deployment job
deploy:
environment:
name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
10 changes: 9 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,16 @@ export default defineNuxtConfig({
},
},
devtools: { enabled: true },

postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},

modules: ['@nuxtjs/i18n', '@nuxtjs/color-mode'],

colorMode: {
preference: 'system', // default value of $colorMode.preference
fallback: 'dark', // fallback value if not system preference found
Expand All @@ -122,6 +125,7 @@ export default defineNuxtConfig({
classSuffix: '',
storageKey: 'nuxt-color-mode',
},

i18n: {
lazy: true,
langDir: 'locales',
Expand All @@ -134,8 +138,10 @@ export default defineNuxtConfig({
},
locales: Object.values(languageLocales),
},

css: ['~/assets/styles/tailwind.css'],
components: [{ path: '~/components', pathPrefix: false }],

vite: {
plugins: [
svgLoader({
Expand All @@ -162,4 +168,6 @@ export default defineNuxtConfig({
},
},
},
})

compatibilityDate: '2024-07-19',
})

Check failure on line 173 in nuxt.config.ts

View workflow job for this annotation

GitHub Actions / cache-and-install

Insert `⏎`
40 changes: 19 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,29 @@
"lintfix": "prettier --write --list-different . && pnpm lint:js --fix"
},
"devDependencies": {
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/vue-fontawesome": "^3.0.6",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/vue-fontawesome": "^3.0.8",
"@nuxt/devtools": "latest",
"@nuxtjs/color-mode": "^3.4.1",
"@nuxtjs/color-mode": "^3.4.2",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@nuxtjs/i18n": "^8.3.1",
"@types/vue-select": "^3.16.8",
"@typescript-eslint/parser": "^6.17.0",
"autoprefixer": "^10.4.16",
"eslint": "^8.56.0",
"@typescript-eslint/parser": "^6.21.0",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.2",
"nuxt": "^3.9.0",
"postcss": "^8.4.32",
"prettier": "^3.1.1",
"sass": "^1.69.7",
"tailwindcss": "^3.4.0",
"typescript": "^5.3.3",
"vite-svg-loader": "^5.1.0",
"vue": "^3.4.5",
"vue-router": "^4.2.5"
},
"dependencies": {
"@nuxtjs/i18n": "^8.3.1",
"eslint-plugin-prettier": "^5.2.1",
"lodash.snakecase": "^4.1.1",
"vue-select": "^4.0.0-beta.3"
"nuxt": "^3.12.4",
"postcss": "^8.4.39",
"prettier": "^3.3.3",
"sass": "^1.77.8",
"tailwindcss": "^3.4.6",
"typescript": "^5.5.3",
"vite-svg-loader": "^5.1.0",
"vue": "^3.4.33",
"vue-router": "^4.4.0",
"vue-select": "4.0.0-beta.6"
}
}
Loading

0 comments on commit 6f97082

Please sign in to comment.