Skip to content

Commit

Permalink
Merge pull request #30 from TranslatorSRI/add-deploy-github-action
Browse files Browse the repository at this point in the history
Add a GitHub Action to publish `website` to GitHub Pages
  • Loading branch information
gaurav committed Jan 4, 2024
2 parents 2908f60 + 1bd5814 commit 5d40301
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 7 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy-website-to-gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish Vue app in Website to GitHub Pages
on:
release:
types: [released]
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install and Build 🔧
working-directory: website
run: |
npm ci
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: website/dist # The folder the action should deploy.
3 changes: 2 additions & 1 deletion website/src/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
--section-gap: 160px;
}

/*
@media (prefers-color-scheme: dark) {
:root {
--color-background: var(--vt-c-black);
Expand All @@ -48,7 +49,7 @@
--color-heading: var(--vt-c-text-dark-1);
--color-text: var(--vt-c-text-dark-2);
}
}
}*/

*,
*::before,
Expand Down
1 change: 1 addition & 0 deletions website/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import AutocompleteValidator from "@/views/AutocompleteValidator.vue";

const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
base: import.meta.env.BASE_URL,
routes: [
{
path: "/",
Expand Down
2 changes: 1 addition & 1 deletion website/src/views/AutocompleteValidator.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<small><a href="/">Return to front page</a></small>
<small><a href="/babel-validation/">Return to front page</a></small>

<h1>Autocomplete Validation</h1>
<p>
Expand Down
6 changes: 3 additions & 3 deletions website/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</p>

<ul>
<li><a href="/nodenorm">Node Normalization Validator</a></li>
<li><a href="/nameres">Name Resolver Validator</a></li>
<li><a href="/autocomplete">Autocomplete Validator</a></li>
<li><a href="/babel-validation/nodenorm">Node Normalization Validator</a></li>
<li><a href="/babel-validation/nameres">Name Resolver Validator</a></li>
<li><a href="/babel-validation/autocomplete">Autocomplete Validator</a></li>
</ul>
</template>

Expand Down
2 changes: 1 addition & 1 deletion website/src/views/NameResValidator.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<small><a href="/">Return to front page</a></small>
<small><a href="/babel-validation/">Return to front page</a></small>

<h1>Name Resolver Validation</h1>
<p>
Expand Down
2 changes: 1 addition & 1 deletion website/src/views/NodeNormValidator.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<small><a href="/">Return to front page</a></small>
<small><a href="/babel-validation/">Return to front page</a></small>
<h1>Node Normalization Validation</h1>
<p>
<a href="https://github.com/TranslatorSRI/babel">Babel</a> is the program that generates the datasets of
Expand Down
1 change: 1 addition & 0 deletions website/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
base: "/babel-validation/",
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
Expand Down

0 comments on commit 5d40301

Please sign in to comment.