Skip to content

Commit 68abb0f

Browse files
authored
Merge branch 'master' into files_guide
2 parents b5c5778 + 8f76335 commit 68abb0f

File tree

217 files changed

+42347
-8300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+42347
-8300
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
max_line_length = 80
Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Deploy to GitHub Pages
32
on:
43
push:
@@ -9,14 +8,29 @@ jobs:
98
if: github.repository == 'AlmaLinux/wiki'
109
runs-on: ubuntu-latest
1110
steps:
12-
- name: Checkout
13-
uses: actions/checkout@master
11+
- name: Checkout
12+
uses: actions/checkout@master
13+
with:
14+
# fetch all commits to get last updated time or other git log info
15+
fetch-depth: 0
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 22
21+
22+
- name: Install deps
23+
run: yarn
24+
25+
- name: Build VuePress site
26+
run: yarn docs:build
1427

15-
- name: Build and Deploy
16-
uses: jenkey2011/vuepress-deploy@master
17-
env:
18-
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
19-
TARGET_REPO: AlmaLinux/wiki
20-
TARGET_BRANCH: gh-pages
21-
BUILD_SCRIPT: yarn && yarn docs:build
22-
BUILD_DIR: docs/.vuepress/dist/
28+
# please check out the docs of the workflow for more details
29+
# @see https://github.com/crazy-max/ghaction-github-pages
30+
- name: Deploy to GitHub Pages
31+
uses: crazy-max/ghaction-github-pages@v4
32+
with:
33+
target_branch: gh-pages
34+
build_dir: docs/.vuepress/dist
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

.github/workflows/prettier.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: autofix.ci
2+
on:
3+
pull_request:
4+
push:
5+
permissions: {}
6+
jobs:
7+
prettier:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
11+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
12+
- run: |
13+
npm ci
14+
npx prettier --write .
15+
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # v1.3.2
16+
with:
17+
commit-message: "Apply Prettier format"

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
node_modules
2-
yarn.lock

Containerfile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
FROM docker.io/library/node:lts-alpine AS builder
22
LABEL stage=auto-clean-stage1
3-
RUN mkdir -p /wiki/tmp
4-
COPY . /wiki/tmp
5-
WORKDIR /wiki/tmp
6-
RUN yarn
3+
RUN mkdir -p /work
4+
COPY . /work
5+
WORKDIR /work
6+
RUN yarn
77

88
FROM docker.io/library/node:lts-alpine
9+
# alternate node_modules directory brought from builder
10+
ARG alt_node_modules=/node_modules
11+
ENV alt_node_modules ${alt_node_modules}
12+
# required for auto last-update
13+
RUN apk update && apk add git
14+
915
RUN mkdir /wiki
1016
WORKDIR /wiki
11-
COPY --from=builder /wiki/tmp/package.json /wiki/package.json
12-
COPY --from=builder /wiki/tmp/node_modules /wiki/node_modules
13-
COPY --from=builder /wiki/tmp/yarn.lock /wiki/yarn.lock
14-
CMD yarn run docs:dev
17+
18+
COPY --from=builder /work/node_modules ${alt_node_modules}
19+
20+
CMD yarn run --modules-folder=${alt_node_modules} vuepress dev docs

aws_amis_md_csv_merge.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# description: Merge multiple AWS AMI metadata CSV ad MD files into one.
4+
#
5+
# All docs/cloud/AWS_AMIS_*.md are merged into docs/cloud/AWS_AMIS.md
6+
# All docs/.vuepress/public/ci-data/aws_amis_*.csv are merged into docs/.vuepress/public/ci-data/aws_amis.csv
7+
#
8+
# In both cases, AlmaLinux newer versions go first, and the files are merged in descending order.
9+
# The MD files are merged by skipping the header line in all but the first file.
10+
11+
# Merge csv files: just concatenate them
12+
csv_data_dir="docs/.vuepress/public/ci-data"
13+
cat ${csv_data_dir}/aws_amis_{10..8}.csv > ${csv_data_dir}/aws_amis.csv
14+
15+
# Merge md files: first one is taking all the lines, and the rest are skipping the header 2 lines
16+
md_data_dir="docs/cloud"
17+
( cat ${md_data_dir}/AWS_AMIS_10.md; tail -q -n +3 ${md_data_dir}/AWS_AMIS_{9..8}.md ) > ${md_data_dir}/AWS_AMIS.md
18+
# Make the md file prettier
19+
npx prettier --parser markdown --write ${md_data_dir}/AWS_AMIS.md

0 commit comments

Comments
 (0)