2020-06-29 10:25:20 +09:00
|
|
|
ARG REPOSITORY_TOKEN
|
2020-06-29 10:23:45 +09:00
|
|
|
|
|
|
|
FROM mcr.microsoft.com/powershell:latest AS prebuild
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . .
|
|
|
|
RUN pwsh -File ./scripts/build_archives.ps1
|
|
|
|
|
|
|
|
FROM node:lts-buster AS build
|
|
|
|
WORKDIR /src
|
|
|
|
COPY --from=prebuild /src .
|
|
|
|
RUN yarn
|
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
FROM mcr.microsoft.com/powershell:latest AS final
|
2020-06-29 10:25:20 +09:00
|
|
|
ARG REPOSITORY_TOKEN
|
|
|
|
ENV REPOSITORY_TOKEN ${REPOSITORY_TOKEN}
|
2020-06-29 10:23:45 +09:00
|
|
|
WORKDIR /src
|
|
|
|
RUN apt-get update
|
|
|
|
RUN apt install -y git
|
|
|
|
COPY ./scripts/deploy.ps1 ./deploy.ps1
|
|
|
|
COPY --from=build /src/docs/.vuepress/dist ./dist
|
|
|
|
CMD [ "pwsh", "deploy.ps1" ]
|