feat: index page, publish ci
This commit is contained in:
15
.github/workflows/publish.yml
vendored
15
.github/workflows/publish.yml
vendored
@@ -1,14 +1,17 @@
|
|||||||
name: Dotfiles publisher
|
name: Dotfiles publisher
|
||||||
on:
|
on: [push]
|
||||||
push:
|
# on:
|
||||||
branches:
|
# push:
|
||||||
- master
|
# branches:
|
||||||
|
# - master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-installer:
|
publish-installer:
|
||||||
name: Publish install script
|
name: Publish setup script
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Publish to CDN
|
- env:
|
||||||
|
APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
|
||||||
|
name: Publish to CDN
|
||||||
run: ./scripts/publish.sh
|
run: ./scripts/publish.sh
|
||||||
|
|||||||
21
README.md
21
README.md
@@ -1,6 +1,6 @@
|
|||||||
# dots.andrejus.dev
|
# dots.andrejus.dev
|
||||||
|
|
||||||
Collection of experimental dotfiles and supporting install scripts.
|
Collection of my dotfiles and supporting install scripts
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
@@ -8,21 +8,24 @@ Collection of experimental dotfiles and supporting install scripts.
|
|||||||
|
|
||||||
## Stack
|
## Stack
|
||||||
|
|
||||||
### Shell
|
Tested and maintained against Debian buster
|
||||||
🐟 fish (+ fisher)
|
|
||||||
|
|
||||||
### Editor
|
### Shells
|
||||||
neovim (+ vim-plug)
|
|
||||||
|
- 🐟 fish (+ fisher)
|
||||||
|
|
||||||
|
### Editors
|
||||||
|
|
||||||
|
- neovim (+ vim-plug)
|
||||||
|
- emacs
|
||||||
|
|
||||||
### Languages
|
### Languages
|
||||||
|
|
||||||
- js (nvm, node, yarn)
|
- node.js (nvm, yarn)
|
||||||
- python (pyenv, poetry)
|
- python (pyenv, poetry)
|
||||||
- java
|
|
||||||
|
|
||||||
### Tools
|
### Tools
|
||||||
|
|
||||||
- docker (+ docker-compose)
|
- docker
|
||||||
- terraform
|
- terraform
|
||||||
- gcloud, firebase, awscli
|
- gcloud, firebase, awscli
|
||||||
- screenfetch
|
|
||||||
|
|||||||
@@ -40,8 +40,13 @@ export PATH="$POETRY_ROOT/bin:$PATH"
|
|||||||
export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"}
|
export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"}
|
||||||
mkdir -p "$NVM_DIR"
|
mkdir -p "$NVM_DIR"
|
||||||
export PATH="$NVM_DIR/bin:$PATH"
|
export PATH="$NVM_DIR/bin:$PATH"
|
||||||
VERSION=`cat $NVM_DIR/alias/lts/fermium` # Default v14
|
|
||||||
export PATH="$NVM_DIR/versions/node/$VERSION/bin:$PATH"
|
# node (default v14)
|
||||||
|
node_alias="$NVM_DIR/alias/lts/fermium"
|
||||||
|
if [ -f "$node_alias" ]; then
|
||||||
|
VERSION=`cat $node_alias`
|
||||||
|
export PATH="$NVM_DIR/versions/node/$VERSION/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
# yarn
|
# yarn
|
||||||
export YARN_DIR=${YARN_DIR:-"$HOME/.yarn"}
|
export YARN_DIR=${YARN_DIR:-"$HOME/.yarn"}
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ resource "google_storage_bucket" "bucket" {
|
|||||||
depends_on = [google_project_service.storage]
|
depends_on = [google_project_service.storage]
|
||||||
|
|
||||||
location = var.gcs_location
|
location = var.gcs_location
|
||||||
|
website {
|
||||||
|
main_page_suffix = "index.html"
|
||||||
|
not_found_page = "index.html"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "google_storage_default_object_access_control" "bucket_public" {
|
resource "google_storage_default_object_access_control" "bucket_public" {
|
||||||
@@ -22,6 +26,22 @@ resource "google_storage_default_object_access_control" "bucket_public" {
|
|||||||
entity = "allUsers"
|
entity = "allUsers"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "google_storage_bucket_object" "index" {
|
||||||
|
name = "index.html"
|
||||||
|
source = "${path.module}/public/index.html"
|
||||||
|
bucket = google_storage_bucket.bucket.name
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_service_account" "uploader_sa" {
|
||||||
|
account_id = "${var.prefix}-uploader-sa"
|
||||||
|
display_name = "Uploader Service Account"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_storage_default_object_access_control" "upload" {
|
||||||
|
bucket = google_storage_bucket.bucket.name
|
||||||
|
role = "OWNER"
|
||||||
|
entity = "user-${google_service_account.uploader_sa.email}"
|
||||||
|
}
|
||||||
|
|
||||||
# =================================================================
|
# =================================================================
|
||||||
# Expose bucket via HTTPS using Cloud CDN
|
# Expose bucket via HTTPS using Cloud CDN
|
||||||
|
|||||||
24
terraform/module/public/index.html
Normal file
24
terraform/module/public/index.html
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>andrejus.dev</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="referrer" content="no-referrer" />
|
||||||
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width,minimum-scale=1,initial-scale=1"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<link rel="canonical" href="https://andrejus.dev/" />
|
||||||
|
<meta
|
||||||
|
http-equiv="refresh"
|
||||||
|
content="0; url=https://github.com/andrejusk/dotfiles"
|
||||||
|
/>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div>
|
||||||
|
<p>Redirecting to GitHub repo...</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user