Skip to content

Commit

Permalink
Merge pull request #1 from Altair-Bueno/main
Browse files Browse the repository at this point in the history
ref: Migrated to Astro
  • Loading branch information
Nrosa01 authored Jun 11, 2023
2 parents 83d0da9 + ab43ad1 commit 35f8743
Show file tree
Hide file tree
Showing 38 changed files with 3,863 additions and 3,295 deletions.
66 changes: 17 additions & 49 deletions .github/workflows/build-website.yaml
Original file line number Diff line number Diff line change
@@ -1,71 +1,39 @@
# .github/workflows/publish.yml
name: Generate a build and push to another branch
name: Deploy to GitHub Pages

on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches:
- main
branches: [main]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
name: Build
steps:
- name: git-checkout
uses: actions/checkout@v2
- name: Checkout your repository using git
uses: actions/checkout@v3
- name: Install, build, and upload your site
uses: withastro/action@v0
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 16 # The specific version of Node that should be used to build your site. Defaults to 16. (optional)
# package-manager: yarn # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)

- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install all dependencies
run: npm install

- name: Build
run: npm run build
env:
VITE_BASE: https://rioni.es

- name: Upload compiled source
uses: actions/upload-artifact@v2
with:
name: website
path: dist/

deploy:
runs-on: ubuntu-latest
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/download-artifact@v3
with:
name: website
- name: Setup Pages
uses: actions/configure-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main
uses: actions/deploy-pages@v1
21 changes: 13 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Logs
logs
*.log
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# environment variables
.env
.env.production

# Editor directories and files
.vscode/*
Expand Down
7 changes: 4 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"svelteStrictMode": true,
"bracketSameLine": true
}
"svelteStrictMode": true,
"bracketSameLine": true,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-astro"]
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["svelte.svelte-vscode"]
"recommendations": ["svelte.svelte-vscode", "astro-build.astro-vscode"]
}
9 changes: 9 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'astro/config';
import svelte from "@astrojs/svelte";

import tailwind from "@astrojs/tailwind";

// https://astro.build/config
export default defineConfig({
integrations: [svelte(), tailwind()]
});
34 changes: 0 additions & 34 deletions jsconfig.json

This file was deleted.

Loading

0 comments on commit 35f8743

Please sign in to comment.